package com.iot.core.domain;

import com.iot.core.utils.BeanUtils;

import java.io.Serializable;
import java.util.HashMap;

public class BaseVO<T> extends HashMap<String,Object> implements Serializable {

    private T entity;

    public BaseVO() {
    }

    public BaseVO(T entity) {
        BeanUtils.transBean2Map(entity, this);
    }

    public T getEntity() {
        return entity;
    }

    public void setEntity(T entity) {
        this.entity = entity;
        BeanUtils.transBean2Map(entity, this);
    }
}
